//
// Created by wsl on 2024/3/9.
//

#ifndef __DATASTRUCTURE_SQQUEUE_H
#define __DATASTRUCTURE_SQQUEUE_H
#include "DataStructure_common.h"

#define SqQueue_Create(T, initSize)		SqQueue_create(sizeof (T), initSize)

typedef struct {
	T base;              		//栈低，起始地址

	int length;					//当前元素个数
	uin32_t front;				//队头
	uin32_t rear;				//队尾
	size_t capacity;    		//容量，当前允许的最大长度
	size_t dataSize;    		//数据大小
} SqQu, *SqQueue;



DataStructure_Warning_Unused
SqQueue SqQueue_create(size_t size_t, uin32_t initSize);

DataStructure_Warning_Unused
Status SqQueue_isEmpty(SqQueue queue);

DataStructure_Warning_Unused
Status SqQueue_enQueue(SqQueue queue, T e);

DataStructure_Warning_Unused
Status SqQueue_deQueue(SqQueue queue, T buf);

DataStructure_Warning_Unused
Status SqQueue_clear(SqQueue queue);

DataStructure_Warning_Unused
Status SqQueue_destroy(SqQueue *queue);

DataStructure_Warning_Unused
Status SqQueue_isFull(SqQueue queue);

DataStructure_Warning_Unused
Status SqQueue_front(SqQueue queue, T buf);


#endif //__DATASTRUCTURE_SQQUEUE_H
